﻿using System;
using System.Collections.ObjectModel;

namespace ilgolosone.DomainModel.Entities
{
    [Serializable]
    public class DishCategory
    {
        public int Id { get; protected set; }
        public string Name { get; set; }

        internal DishCategory(int id)
        {
            Id = id;
        }

        public override string ToString()
        {
            return Name;
        }
    }

    [Serializable]
    public class DishCategories : ReadOnlyCollection<DishCategory>
    {
        public static DishCategory Pasta   = new DishCategory(1) { Name = "Pasta"   };
        public static DishCategory Carne   = new DishCategory(2) { Name = "Carne"   };
        public static DishCategory Pesce   = new DishCategory(3) { Name = "Pesce"   };
        public static DishCategory Frutta  = new DishCategory(4) { Name = "Frutta"  };
        public static DishCategory Dolce   = new DishCategory(5) { Name = "Dolce"   };
        public static DishCategory Liquore = new DishCategory(6) { Name = "Liquore" };

        public DishCategories()
            : base(new[] { Pasta, Carne, Pesce, Frutta, Dolce, Liquore })
        { }
    }
}
